package com.eastfair.venueservice.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.eastfair.core.base.entity.Entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.eastfair.database.mybatis.typehandler.M9EncryptHandler;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import static com.eastfair.core.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;
import com.eastfair.annotation.model.EchoVO;
import com.eastfair.venueservice.enumeration.ExhibitionCompanyCompanySourceEnum;
import com.eastfair.venueservice.enumeration.ExhibitionCompanyCompanyTypeEnum;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 展会相关企业
 * </p>
 *
 * @author dq
 * @since 2022-10-26
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName(value="vsm_exhibition_company",autoResultMap = true)
@ApiModel(value = "ExhibitionCompany", description = "展会相关企业")
@AllArgsConstructor
public class ExhibitionCompany extends Entity<Long> implements EchoVO {

    private static final long serialVersionUID = 1L;
    @TableField(exist = false)
    private Map<String, Object> echoMap = new HashMap<>();
    /**
     * 是否启用（确认状态）：1是 已确认；0否 未确认
     */
    @ApiModelProperty(value = "是否启用（确认状态）：1是 已确认；0否 未确认")
    @TableField(value = "is_enabled")
    @Excel(name = "是否启用（确认状态）：1是 已确认；0否 未确认")
    private Integer isEnabled;

    /**
     * 是否删除：1是；0否
     */
    @ApiModelProperty(value = "是否删除：1是；0否")
    @TableField(value = "is_deleted")
    @Excel(name = "是否删除：1是；0否")
    private Integer isDeleted;

    /**
     * 项目id
     */
    @ApiModelProperty(value = "项目id")
    @TableField(value = "project_id")
    @Excel(name = "项目id")
    private Long projectId;

    /**
     * 子系统id
     */
    @ApiModelProperty(value = "子系统id")
    @TableField(value = "subsystem_id")
    @Excel(name = "子系统id")
    private Long subsystemId;

    /**
     * 租户id
     */
    @ApiModelProperty(value = "租户id")
    @TableField(value = "tenant_id")
    @Excel(name = "租户id")
    private Long tenantId;

    /**
     * 企业编码
     */
    @ApiModelProperty(value = "企业编码")
    @Size(max = 64, message = "企业编码长度不能超过64")
    @TableField(value = "company_code", condition = LIKE)
    @Excel(name = "企业编码")
    private String companyCode;

    /**
     * 企业名称
     */
    @ApiModelProperty(value = "企业名称")
    @Size(max = 100, message = "企业名称长度不能超过100")
    @TableField(value = "company_name", condition = LIKE)
    @Excel(name = "企业名称")
    private String companyName;

    /**
     * 企业类型 #{BUILD_SERVICE_PROVIDER:搭建商;MAIN_TRANSPORT_SERVICE_PROVIDER:主运商;HOME_SERVICE_PROVIDER:主场商;MATCHING_SERVICE_PROVIDER:配套商;SPONSOR:主办方;EXHIBITOR:参展商;OTHERS:其他}
     */
    @ApiModelProperty(value = "企业类型 #{BUILD_SERVICE_PROVIDER:搭建商;MAIN_TRANSPORT_SERVICE_PROVIDER:主运商;HOME_SERVICE_PROVIDER:主场商;MATCHING_SERVICE_PROVIDER:配套商;SPONSOR:主办方;EXHIBITOR:参展商;OTHERS:其他}")
    @TableField(value = "company_type")
    @Excel(name = "企业类型 #{BUILD_SERVICE_PROVIDER:搭建商;MAIN_TRANSPORT_SERVICE_PROVIDER:主运商;HOME_SERVICE_PROVIDER:主场商;MATCHING_SERVICE_PROVIDER:配套商;SPONSOR:主办方;EXHIBITOR:参展商;OTHERS:其他}", replace = {"搭建商_BUILD_SERVICE_PROVIDER", "主运商_MAIN_TRANSPORT_SERVICE_PROVIDER", "主场商_HOME_SERVICE_PROVIDER", "配套商_MATCHING_SERVICE_PROVIDER", "主办方_SPONSOR", "参展商_EXHIBITOR", "其他_OTHERS",  "_null"})
    private ExhibitionCompanyCompanyTypeEnum companyType;

    /**
     * 公司来源 #{SYSTEM_OPERATE:系统维护;MANUAL_OPERATE:手动录入}
     */
    @ApiModelProperty(value = "公司来源 #{SYSTEM_OPERATE:系统维护;MANUAL_OPERATE:手动录入}")
    @TableField(value = "company_source")
    @Excel(name = "公司来源 #{SYSTEM_OPERATE:系统维护;MANUAL_OPERATE:手动录入}", replace = {"系统维护_SYSTEM_OPERATE", "手动录入_MANUAL_OPERATE",  "_null"})
    private ExhibitionCompanyCompanySourceEnum companySource;

    /**
     * 展会ID
     */
    @ApiModelProperty(value = "展会ID")
    @TableField(value = "exhibition_manage_id")
    @Excel(name = "展会ID")
    private Long exhibitionManageId;

    /**
     * 展会名称
     */
    @ApiModelProperty(value = "展会名称")
    @Size(max = 200, message = "展会名称长度不能超过200")
    @TableField(value = "exhibition_manage_name", condition = LIKE)
    @Excel(name = "展会名称")
    private String exhibitionManageName;

    /**
     * 是否是系统记录的服务商(0:否;1:是)
     */
    @ApiModelProperty(value = "是否是系统记录的服务商(0:否;1:是)")
    @TableField(value = "is_service_provider")
    @Excel(name = "是否是系统记录的服务商(0:否;1:是)")
    private Integer isServiceProvider;

    /**
     * 系统记录的服务商ID
     */
    @ApiModelProperty(value = "系统记录的服务商ID")
    @TableField(value = "service_provider_id")
    @Excel(name = "系统记录的服务商ID")
    private Long serviceProviderId;

    /**
     * 系统记录的服务商名称
     */
    @ApiModelProperty(value = "系统记录的服务商名称")
    @Size(max = 64, message = "系统记录的服务商名称长度不能超过64")
    @TableField(value = "service_provider_name", condition = LIKE)
    @Excel(name = "系统记录的服务商名称")
    private String serviceProviderName;

    /**
     * 是否是系统维护的参展商(0否;1:是)
     */
    @ApiModelProperty(value = "是否是系统维护的参展商(0否;1:是)")
    @TableField(value = "is_exhibitor")
    @Excel(name = "是否是系统维护的参展商(0否;1:是)")
    private Integer isExhibitor;

    /**
     * 展商ID
     */
    @ApiModelProperty(value = "展商ID")
    @TableField(value = "exhibitor_id")
    @Excel(name = "展商ID")
    private Long exhibitorId;

    /**
     * 展商名称
     */
    @ApiModelProperty(value = "展商名称")
    @Size(max = 100, message = "展商名称长度不能超过100")
    @TableField(value = "exhibitor_name", condition = LIKE)
    @Excel(name = "展商名称")
    private String exhibitorName;

    /**
     * 联系人名称
     */
    @ApiModelProperty(value = "联系人名称")
    @Size(max = 100, message = "联系人名称长度不能超过100")
    @TableField(value = "contact", condition = LIKE)
    @Excel(name = "联系人名称")
    private String contact;

    /**
     * 联系方式
     */
    @ApiModelProperty(value = "联系方式")
    @Size(max = 50, message = "联系方式长度不能超过50")
    @TableField(value = "phone", condition = LIKE,typeHandler = M9EncryptHandler.class)
    @Excel(name = "联系方式")
    private String phone;

    /**
     * 是否拥有展台(0:否;1:是)
     */
    @ApiModelProperty(value = "是否拥有展台(0:否;1:是)")
    @TableField(value = "has_site")
    @Excel(name = "是否拥有展台(0:否;1:是)")
    private Integer hasSite;

    /**
     * 展台类型
     */
    @ApiModelProperty(value = "展台类型")
    @Size(max = 64, message = "展台类型长度不能超过64")
    @TableField(value = "site_type", condition = LIKE)
    @Excel(name = "展台类型")
    private String siteType;

    /**
     * 展位号
     */
    @ApiModelProperty(value = "展位号")
    @Size(max = 100, message = "展位号长度不能超过100")
    @TableField(value = "site_name", condition = LIKE)
    @Excel(name = "展位号")
    private String siteName;

    /**
     * 展位面积
     */
    @ApiModelProperty(value = "展位面积")
    @TableField(value = "site_area")
    @Excel(name = "展位面积")
    private BigDecimal siteArea;

    /**
     * 展厅编码
     */
    @ApiModelProperty(value = "展厅编码")
    @Size(max = 64, message = "展厅编码长度不能超过64")
    @TableField(value = "space_code", condition = LIKE)
    @Excel(name = "展厅编码")
    private String spaceCode;

    /**
     * 展厅号
     */
    @ApiModelProperty(value = "展厅号")
    @Size(max = 64, message = "展厅号长度不能超过64")
    @TableField(value = "space_name", condition = LIKE)
    @Excel(name = "展厅号")
    private String spaceName;


    @Builder
    public ExhibitionCompany(Long id, Long createdBy, LocalDateTime createTime, Long updatedBy, LocalDateTime updateTime, 
                    Integer isEnabled, Integer isDeleted, Long projectId, Long subsystemId, Long tenantId, 
                    String companyCode, String companyName, ExhibitionCompanyCompanyTypeEnum companyType, ExhibitionCompanyCompanySourceEnum companySource, Long exhibitionManageId, String exhibitionManageName, 
                    Integer isServiceProvider, Long serviceProviderId, String serviceProviderName, Integer isExhibitor, Long exhibitorId, String exhibitorName, 
                    String contact, String phone, Integer hasSite, String siteType, String siteName, BigDecimal siteArea, 
                    String spaceCode, String spaceName) {
        this.id = id;
        this.createdBy = createdBy;
        this.createTime = createTime;
        this.updatedBy = updatedBy;
        this.updateTime = updateTime;
        this.isEnabled = isEnabled;
        this.isDeleted = isDeleted;
        this.projectId = projectId;
        this.subsystemId = subsystemId;
        this.tenantId = tenantId;
        this.companyCode = companyCode;
        this.companyName = companyName;
        this.companyType = companyType;
        this.companySource = companySource;
        this.exhibitionManageId = exhibitionManageId;
        this.exhibitionManageName = exhibitionManageName;
        this.isServiceProvider = isServiceProvider;
        this.serviceProviderId = serviceProviderId;
        this.serviceProviderName = serviceProviderName;
        this.isExhibitor = isExhibitor;
        this.exhibitorId = exhibitorId;
        this.exhibitorName = exhibitorName;
        this.contact = contact;
        this.phone = phone;
        this.hasSite = hasSite;
        this.siteType = siteType;
        this.siteName = siteName;
        this.siteArea = siteArea;
        this.spaceCode = spaceCode;
        this.spaceName = spaceName;
    }

}
